package com.dq.Week2.day06;

public class Student extends Person{

    public static void main(String[] args) {
        Student student = new Student();
        student.show();
    }

    String name = "子类的name";
    @Override
    public void play() {
        System.out.println("这是子类的play方法");
    }
    public void show() {
        //子类的name属性
        System.out.println(this.name);
        //子类的play方法
        this.play();

        //父类的name属性
        System.out.println(super.name);
        //父类的play方法
        super.play();
        //如果没有重名属性，则是同一个属性age
        System.out.println(this.age);
        System.out.println(super.age);
        System.out.println(age);
    }
}